#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from configparser import ConfigParser
from pathlib import PurePath, Path
from happy_python import HappyLog

# happy-python日志
CONFIG_DIR = PurePath(__file__).parent / 'config'
LOG_CONFIG_FILENAME = str(CONFIG_DIR / 'log.ini')
hlog = HappyLog.get_instance(LOG_CONFIG_FILENAME)

# 配置文件路径
mq_config_abs_path = Path(__file__).parent / Path("config") / Path("mq_config.ini")
common_abs_path = Path(__file__).parent / Path("config") / Path("common.ini")
api_config_abs_path = Path(__file__).parent / Path("config") / Path("api_config.ini")

config = ConfigParser()
config.read(common_abs_path.absolute(), encoding='UTF-8')
max_error_count = config['error_count']["maxErrorCount"]
